/**
 * @classdesc 用来保存Layer的ID
 * @author Niyang
 */
export default class Store {
    constructor () {
        this.cache = null
        this.initialize()
    }

    /**
         * @description 初始化
         */
    initialize () {
        this.cache = {}
    }

    /**
         * @description 保存
         * @param {String} key
         * @param {Number} value
         */
    set (key, value) {
        this.cache[key] = value
    }

    /**
         * @description 获取
         * @param {String} key
         * @returns Number
         */
    get (key) {
        return this.cache[key]
    }

    /**
         * @description 销毁 Map调用remove();后再调用
         */
    destroy () {
        this.cache = null
    }
}
